<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QTreeWidget Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QTreeWidget Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QTreeWidget class provides a tree view that uses a
predefined tree model. <a href="#details">More...</a></p>

<p>Inherits <a href="qtreeview.html">QTreeView</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qtreewidget.html#QTreeWidget">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qtreewidget.html#addTopLevelItem">addTopLevelItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#addTopLevelItems">addTopLevelItems</a></b> (<i>self</i>, list-of-QTreeWidgetItem&#160;<i>items</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#clear">clear</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#closePersistentEditor">closePersistentEditor</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, int&#160;<i>column</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qtreewidget.html#collapseItem">collapseItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" />int <b><a href="qtreewidget.html#columnCount">columnCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qtreewidget.html#currentColumn">currentColumn</a></b> (<i>self</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidget.html#currentItem">currentItem</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#dropEvent">dropEvent</a></b> (<i>self</i>, QDropEvent&#160;<i>event</i>)</li><li><div class="fn" />bool <b><a href="qtreewidget.html#dropMimeData">dropMimeData</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>parent</i>, int&#160;<i>index</i>, QMimeData&#160;<i>data</i>, Qt.DropAction&#160;<i>action</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#editItem">editItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, int&#160;<i>column</i>&#160;=&#160;0)</li><li><div class="fn" />bool <b><a href="qtreewidget.html#event">event</a></b> (<i>self</i>, QEvent&#160;<i>e</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#expandItem">expandItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" />list-of-QTreeWidgetItem <b><a href="qtreewidget.html#findItems">findItems</a></b> (<i>self</i>, QString&#160;<i>text</i>, Qt.MatchFlags&#160;<i>flags</i>, int&#160;<i>column</i>&#160;=&#160;0)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidget.html#headerItem">headerItem</a></b> (<i>self</i>)</li><li><div class="fn" />QModelIndex <b><a href="qtreewidget.html#indexFromItem">indexFromItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, int&#160;<i>column</i>&#160;=&#160;0)</li><li><div class="fn" />int <b><a href="qtreewidget.html#indexOfTopLevelItem">indexOfTopLevelItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#insertTopLevelItem">insertTopLevelItem</a></b> (<i>self</i>, int&#160;<i>index</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#insertTopLevelItems">insertTopLevelItems</a></b> (<i>self</i>, int&#160;<i>index</i>, list-of-QTreeWidgetItem&#160;<i>items</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidget.html#invisibleRootItem">invisibleRootItem</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qtreewidget.html#isFirstItemColumnSpanned">isFirstItemColumnSpanned</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" />bool <b><a href="qtreewidget.html#isItemExpanded">isItemExpanded</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" />bool <b><a href="qtreewidget.html#isItemHidden">isItemHidden</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" />bool <b><a href="qtreewidget.html#isItemSelected">isItemSelected</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" />bool <b><a href="qtreewidget.html#isSortingEnabled">isSortingEnabled</a></b> (<i>self</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidget.html#itemAbove">itemAbove</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidget.html#itemAt">itemAt</a></b> (<i>self</i>, QPoint&#160;<i>p</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidget.html#itemAt-2">itemAt</a></b> (<i>self</i>, int&#160;<i>ax</i>, int&#160;<i>ay</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidget.html#itemBelow">itemBelow</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidget.html#itemFromIndex">itemFromIndex</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" />list-of-QTreeWidgetItem <b><a href="qtreewidget.html#items">items</a></b> (<i>self</i>, QMimeData&#160;<i>data</i>)</li><li><div class="fn" />QWidget <b><a href="qtreewidget.html#itemWidget">itemWidget</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, int&#160;<i>column</i>)</li><li><div class="fn" />QMimeData <b><a href="qtreewidget.html#mimeData">mimeData</a></b> (<i>self</i>, list-of-QTreeWidgetItem&#160;<i>items</i>)</li><li><div class="fn" />QStringList <b><a href="qtreewidget.html#mimeTypes">mimeTypes</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#openPersistentEditor">openPersistentEditor</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, int&#160;<i>column</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qtreewidget.html#removeItemWidget">removeItemWidget</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, int&#160;<i>column</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#scrollToItem">scrollToItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, QAbstractItemView.ScrollHint&#160;<i>hint</i>&#160;=&#160;QAbstractItemView.EnsureVisible)</li><li><div class="fn" />list-of-QTreeWidgetItem <b><a href="qtreewidget.html#selectedItems">selectedItems</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setColumnCount">setColumnCount</a></b> (<i>self</i>, int&#160;<i>columns</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setCurrentItem">setCurrentItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setCurrentItem-2">setCurrentItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, int&#160;<i>column</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setCurrentItem-3">setCurrentItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, int&#160;<i>column</i>, QItemSelectionModel.SelectionFlags&#160;<i>command</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setFirstItemColumnSpanned">setFirstItemColumnSpanned</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, bool&#160;<i>span</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setHeaderItem">setHeaderItem</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setHeaderLabel">setHeaderLabel</a></b> (<i>self</i>, QString&#160;<i>alabel</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setHeaderLabels">setHeaderLabels</a></b> (<i>self</i>, QStringList&#160;<i>labels</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setItemExpanded">setItemExpanded</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, bool&#160;<i>expand</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setItemHidden">setItemHidden</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, bool&#160;<i>hide</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setItemSelected">setItemSelected</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, bool&#160;<i>select</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setItemWidget">setItemWidget</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>, int&#160;<i>column</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setSelectionModel">setSelectionModel</a></b> (<i>self</i>, QItemSelectionModel&#160;<i>selectionModel</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#setSortingEnabled">setSortingEnabled</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" />int <b><a href="qtreewidget.html#sortColumn">sortColumn</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qtreewidget.html#sortItems">sortItems</a></b> (<i>self</i>, int&#160;<i>column</i>, Qt.SortOrder&#160;<i>order</i>)</li><li><div class="fn" />Qt.DropActions <b><a href="qtreewidget.html#supportedDropActions">supportedDropActions</a></b> (<i>self</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidget.html#takeTopLevelItem">takeTopLevelItem</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />QTreeWidgetItem <b><a href="qtreewidget.html#topLevelItem">topLevelItem</a></b> (<i>self</i>, int&#160;<i>index</i>)</li><li><div class="fn" />int <b><a href="qtreewidget.html#topLevelItemCount">topLevelItemCount</a></b> (<i>self</i>)</li><li><div class="fn" />QRect <b><a href="qtreewidget.html#visualItemRect">visualItemRect</a></b> (<i>self</i>, QTreeWidgetItem&#160;<i>item</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qtreewidget.html#currentItemChanged">currentItemChanged</a></b> (QTreeWidgetItem *,QTreeWidgetItem *)</li><li><div class="fn" />void <b><a href="qtreewidget.html#itemActivated">itemActivated</a></b> (QTreeWidgetItem *,int)</li><li><div class="fn" />void <b><a href="qtreewidget.html#itemChanged">itemChanged</a></b> (QTreeWidgetItem *,int)</li><li><div class="fn" />void <b><a href="qtreewidget.html#itemClicked">itemClicked</a></b> (QTreeWidgetItem *,int)</li><li><div class="fn" />void <b><a href="qtreewidget.html#itemCollapsed">itemCollapsed</a></b> (QTreeWidgetItem *)</li><li><div class="fn" />void <b><a href="qtreewidget.html#itemDoubleClicked">itemDoubleClicked</a></b> (QTreeWidgetItem *,int)</li><li><div class="fn" />void <b><a href="qtreewidget.html#itemEntered">itemEntered</a></b> (QTreeWidgetItem *,int)</li><li><div class="fn" />void <b><a href="qtreewidget.html#itemExpanded">itemExpanded</a></b> (QTreeWidgetItem *)</li><li><div class="fn" />void <b><a href="qtreewidget.html#itemPressed">itemPressed</a></b> (QTreeWidgetItem *,int)</li><li><div class="fn" />void <b><a href="qtreewidget.html#itemSelectionChanged">itemSelectionChanged</a></b> ()</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QTreeWidget class provides a tree view that uses a
predefined tree model.</p>
<p>The QTreeWidget class is a convenience class that provides a
standard tree widget with a classic item-based interface similar to
that used by the <a href="qlistview.html">QListView</a> class in Qt
3. This class is based on Qt's Model/View architecture and uses a
default model to hold items, each of which is a <a href="qtreewidgetitem.html">QTreeWidgetItem</a>.</p>
<p>Developers who do not need the flexibility of the Model/View
framework can use this class to create simple hierarchical lists
very easily. A more flexible approach involves combining a <a href="qtreeview.html">QTreeView</a> with a standard item model. This
allows the storage of data to be separated from its
representation.</p>
<p>In its simplest form, a tree widget can be constructed in the
following way:</p>
<pre class="cpp">
 <span class="type">QTreeWidget</span> <span class="operator">*</span>treeWidget <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QTreeWidget</span>();
 treeWidget<span class="operator">-</span><span class="operator">&gt;</span><a href="qtreewidget.html#columnCount-prop">setColumnCount</a>(<span class="number">1</span>);
 <span class="type"><a href="qlist.html">QList</a></span><span class="operator">&lt;</span><span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span> <span class="operator">*</span><span class="operator">&gt;</span> items;
 <span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; i <span class="operator">&lt;</span> <span class="number">10</span>; <span class="operator">+</span><span class="operator">+</span>i)
     items<span class="operator">.</span>append(<span class="keyword">new</span> <span class="type"><a href="qtreewidgetitem.html">QTreeWidgetItem</a></span>((<span class="type">QTreeWidget</span><span class="operator">*</span>)<span class="number">0</span><span class="operator">,</span> <span class="type"><a href="qstringlist.html">QStringList</a></span>(<span class="type"><a href="qstring.html">QString</a></span>(<span class="string">"item: %1"</span>)<span class="operator">.</span>arg(i))));
 treeWidget<span class="operator">-</span><span class="operator">&gt;</span><a href="qtreewidget.html#insertTopLevelItems">insertTopLevelItems</a>(<span class="number">0</span><span class="operator">,</span> items);
</pre>
<p>Before items can be added to the tree widget, the number of
columns must be set with <a href="qtreewidget.html#columnCount-prop">setColumnCount</a>(). This
allows each item to have one or more labels or other decorations.
The number of columns in use can be found with the <a href="qtreewidget.html#columnCount-prop">columnCount</a>() function.</p>
<p>The tree can have a header that contains a section for each
column in the widget. It is easiest to set up the labels for each
section by supplying a list of strings with <a href="qtreewidget.html#setHeaderLabels">setHeaderLabels</a>(), but a
custom header can be constructed with a <a href="qtreewidgetitem.html">QTreeWidgetItem</a> and inserted into the
tree with the <a href="qtreewidget.html#setHeaderItem">setHeaderItem</a>() function.</p>
<p>The items in the tree can be sorted by column according to a
predefined sort order. If sorting is enabled, the user can sort the
items by clicking on a column header. Sorting can be enabled or
disabled by calling <a href="qtreeview.html#sortingEnabled-prop">setSortingEnabled()</a>. The
<a href="qtreeview.html#sortingEnabled-prop">isSortingEnabled()</a>
function indicates whether sorting is enabled.</p>
<table class="generic" width="100%">
<tr class="odd" valign="top">
<td><img alt="Screenshot of a Windows XP style tree widget" src="images/windowsxp-treeview.png" /></td>
<td><img alt="Screenshot of a Macintosh style tree widget" src="images/macintosh-treeview.png" /></td>
<td><img alt="Screenshot of a Plastique style tree widget" src="images/plastique-treeview.png" /></td>
</tr>
<tr class="even" valign="top">
<td>A <a href="gallery-windowsxp.html">Windows XP style</a> tree
widget.</td>
<td>A <a href="gallery-macintosh.html">Macintosh style</a> tree
widget.</td>
<td>A <a href="gallery-plastique.html">Plastique style</a> tree
widget.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QTreeWidget" />QTreeWidget.__init__ (<i>self</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a tree widget with the given <i>parent</i>.</p>


<h3 class="fn"><a name="addTopLevelItem" />QTreeWidget.addTopLevelItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>The <i>item</i> argument has it's ownership transferred to Qt.</p><p>Appends the <i>item</i> as a top-level item in the widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qtreewidget.html#insertTopLevelItem">insertTopLevelItem</a>().</p>


<h3 class="fn"><a name="addTopLevelItems" />QTreeWidget.addTopLevelItems (<i>self</i>, list-of-QTreeWidgetItem&#160;<i>items</i>)</h3><p>The <i>items</i> argument has it's ownership transferred to Qt.</p><p>Appends the list of <i>items</i> as a top-level items in the
widget.</p>
<p><b>See also</b> <a href="qtreewidget.html#insertTopLevelItems">insertTopLevelItems</a>().</p>


<h3 class="fn"><a name="clear" />QTreeWidget.clear (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void clear()</tt>.</p><p>Clears the tree widget by removing all of its items and
selections.</p>
<p><b>Note:</b> Since each item is removed from the tree widget
before being deleted, the return value of <a href="qtreewidgetitem.html#treeWidget">QTreeWidgetItem.treeWidget</a>()
will be invalid when called from an item's destructor.</p>
<p><b>See also</b> <a href="qtreewidget.html#takeTopLevelItem">takeTopLevelItem</a>(),
<a href="qtreewidget.html#topLevelItemCount-prop">topLevelItemCount</a>(),
and <a href="qtreewidget.html#columnCount-prop">columnCount</a>().</p>


<h3 class="fn"><a name="closePersistentEditor" />QTreeWidget.closePersistentEditor (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, int&#160;<i>column</i>&#160;=&#160;0)</h3><p>Closes the persistent editor for the <i>item</i> in the given
<i>column</i>.</p>
<p>This function has no effect if no persistent editor is open for
this combination of item and column.</p>
<p><b>See also</b> <a href="qtreewidget.html#openPersistentEditor">openPersistentEditor</a>().</p>


<h3 class="fn"><a name="collapseItem" />QTreeWidget.collapseItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void collapseItem(const QTreeWidgetItem *)</tt>.</p><p>Closes the <i>item</i>. This causes the tree containing the
item's children to be collapsed.</p>
<p><b>See also</b> <a href="qtreewidget.html#expandItem">expandItem</a>(), <a href="qtreewidget.html#currentItem">currentItem</a>(), <a href="qtreewidget.html#itemAt">itemAt</a>(), and <a href="qtreewidget.html#topLevelItem">topLevelItem</a>().</p>


<h3 class="fn"><a name="columnCount" />int QTreeWidget.columnCount (<i>self</i>)</h3><h3 class="fn"><a name="currentColumn" />int QTreeWidget.currentColumn (<i>self</i>)</h3><p>Returns the current column in the tree widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qtreewidget.html#setCurrentItem">setCurrentItem</a>() and <a href="qtreewidget.html#columnCount-prop">columnCount</a>().</p>


<h3 class="fn"><a name="currentItem" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidget.currentItem (<i>self</i>)</h3><p>Returns the current item in the tree widget.</p>
<p><b>See also</b> <a href="qtreewidget.html#setCurrentItem">setCurrentItem</a>() and <a href="qtreewidget.html#currentItemChanged">currentItemChanged</a>().</p>


<h3 class="fn"><a name="dropEvent" />QTreeWidget.dropEvent (<i>self</i>, <a href="qdropevent.html">QDropEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qwidget.html#dropEvent">QWidget.dropEvent</a>().</p>


<h3 class="fn"><a name="dropMimeData" />bool QTreeWidget.dropMimeData (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>parent</i>, int&#160;<i>index</i>, <a href="qmimedata.html">QMimeData</a>&#160;<i>data</i>, <a href="qt.html#DropAction-enum">Qt.DropAction</a>&#160;<i>action</i>)</h3><p>Handles the <i>data</i> supplied by a drag and drop operation
that ended with the given <i>action</i> in the <i>index</i> in the
given <i>parent</i> item.</p>
<p>The default implementation returns true if the drop was
successfully handled by decoding the mime data and inserting it
into the model; otherwise it returns false.</p>
<p><b>See also</b> <a href="qtreewidget.html#supportedDropActions">supportedDropActions</a>().</p>


<h3 class="fn"><a name="editItem" />QTreeWidget.editItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, int&#160;<i>column</i>&#160;=&#160;0)</h3><p>Starts editing the <i>item</i> in the given <i>column</i> if it
is editable.</p>


<h3 class="fn"><a name="event" />bool QTreeWidget.event (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>


<h3 class="fn"><a name="expandItem" />QTreeWidget.expandItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void expandItem(const QTreeWidgetItem *)</tt>.</p><p>Expands the <i>item</i>. This causes the tree containing the
item's children to be expanded.</p>
<p><b>See also</b> <a href="qtreewidget.html#collapseItem">collapseItem</a>(), <a href="qtreewidget.html#currentItem">currentItem</a>(), <a href="qtreewidget.html#itemAt">itemAt</a>(), <a href="qtreewidget.html#topLevelItem">topLevelItem</a>(), and <a href="qtreewidget.html#itemExpanded">itemExpanded</a>().</p>


<h3 class="fn"><a name="findItems" />list-of-QTreeWidgetItem QTreeWidget.findItems (<i>self</i>, QString&#160;<i>text</i>, <a href="qt-matchflags.html">Qt.MatchFlags</a>&#160;<i>flags</i>, int&#160;<i>column</i>&#160;=&#160;0)</h3><p>Returns a list of items that match the given <i>text</i>, using
the given <i>flags</i>, in the given <i>column</i>.</p>


<h3 class="fn"><a name="headerItem" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidget.headerItem (<i>self</i>)</h3><p>Returns the item used for the tree widget's header.</p>
<p><b>See also</b> <a href="qtreewidget.html#setHeaderItem">setHeaderItem</a>().</p>


<h3 class="fn"><a name="indexFromItem" /><a href="qmodelindex.html">QModelIndex</a> QTreeWidget.indexFromItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, int&#160;<i>column</i>&#160;=&#160;0)</h3><p>Returns the <a href="qmodelindex.html">QModelIndex</a> assocated
with the given <i>item</i> in the given <i>column</i>.</p>
<p><b>See also</b> <a href="qtreewidget.html#itemFromIndex">itemFromIndex</a>() and <a href="qtreewidget.html#topLevelItem">topLevelItem</a>().</p>


<h3 class="fn"><a name="indexOfTopLevelItem" />int QTreeWidget.indexOfTopLevelItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>Returns the index of the given top-level <i>item</i>, or -1 if
the item cannot be found.</p>
<p><b>See also</b> <a href="qtreewidget.html#sortItems">sortItems</a>() and <a href="qtreewidget.html#topLevelItemCount-prop">topLevelItemCount</a>().</p>


<h3 class="fn"><a name="insertTopLevelItem" />QTreeWidget.insertTopLevelItem (<i>self</i>, int&#160;<i>index</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>The <i>item</i> argument has it's ownership transferred to Qt.</p><p>Inserts the <i>item</i> at <i>index</i> in the top level in the
view.</p>
<p>If the item has already been inserted somewhere else it wont be
inserted.</p>
<p><b>See also</b> <a href="qtreewidget.html#addTopLevelItem">addTopLevelItem</a>() and
<a href="qtreewidget.html#columnCount-prop">columnCount</a>().</p>


<h3 class="fn"><a name="insertTopLevelItems" />QTreeWidget.insertTopLevelItems (<i>self</i>, int&#160;<i>index</i>, list-of-QTreeWidgetItem&#160;<i>items</i>)</h3><p>The <i>items</i> argument has it's ownership transferred to Qt.</p><p>Inserts the list of <i>items</i> at <i>index</i> in the top
level in the view.</p>
<p>Items that have already been inserted somewhere else wont be
inserted.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qtreewidget.html#addTopLevelItems">addTopLevelItems</a>().</p>


<h3 class="fn"><a name="invisibleRootItem" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidget.invisibleRootItem (<i>self</i>)</h3><p>Returns the tree widget's invisible root item.</p>
<p>The invisible root item provides access to the tree widget's
top-level items through the <a href="qtreewidgetitem.html">QTreeWidgetItem</a> API, making it possible
to write functions that can treat top-level items and their
children in a uniform way; for example, recursive functions.</p>
<p>This function was introduced in Qt 4.2.</p>


<h3 class="fn"><a name="isFirstItemColumnSpanned" />bool QTreeWidget.isFirstItemColumnSpanned (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>Returns true if the given <i>item</i> is set to show only one
section over all columns; otherwise returns false.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtreewidget.html#setFirstItemColumnSpanned">setFirstItemColumnSpanned</a>().</p>


<h3 class="fn"><a name="isItemExpanded" />bool QTreeWidget.isItemExpanded (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><h3 class="fn"><a name="isItemHidden" />bool QTreeWidget.isItemHidden (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><h3 class="fn"><a name="isItemSelected" />bool QTreeWidget.isItemSelected (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><h3 class="fn"><a name="isSortingEnabled" />bool QTreeWidget.isSortingEnabled (<i>self</i>)</h3><h3 class="fn"><a name="itemAbove" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidget.itemAbove (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>Returns the item above the given <i>item</i>.</p>
<p>This function was introduced in Qt 4.3.</p>


<h3 class="fn"><a name="itemAt" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidget.itemAt (<i>self</i>, <a href="qpoint.html">QPoint</a>&#160;<i>p</i>)</h3><p>Returns a pointer to the item at the coordinates <i>p</i>. The
coordinates are relative to the tree widget's <a href="qabstractscrollarea.html#viewport">viewport()</a>.</p>
<p><b>See also</b> <a href="qtreewidget.html#visualItemRect">visualItemRect</a>().</p>


<h3 class="fn"><a name="itemAt-2" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidget.itemAt (<i>self</i>, int&#160;<i>ax</i>, int&#160;<i>ay</i>)</h3><p>This is an overloaded function.</p>
<p>Returns a pointer to the item at the coordinates (<i>x</i>,
<i>y</i>). The coordinates are relative to the tree widget's
<a href="qabstractscrollarea.html#viewport">viewport()</a>.</p>


<h3 class="fn"><a name="itemBelow" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidget.itemBelow (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>Returns the item visually below the given <i>item</i>.</p>
<p>This function was introduced in Qt 4.3.</p>


<h3 class="fn"><a name="itemFromIndex" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidget.itemFromIndex (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Returns a pointer to the <a href="qtreewidgetitem.html">QTreeWidgetItem</a> assocated with the given
<i>index</i>.</p>
<p><b>See also</b> <a href="qtreewidget.html#indexFromItem">indexFromItem</a>().</p>


<h3 class="fn"><a name="items" />list-of-QTreeWidgetItem QTreeWidget.items (<i>self</i>, <a href="qmimedata.html">QMimeData</a>&#160;<i>data</i>)</h3><h3 class="fn"><a name="itemWidget" /><a href="qwidget.html">QWidget</a> QTreeWidget.itemWidget (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, int&#160;<i>column</i>)</h3><p>Returns the widget displayed in the cell specified by
<i>item</i> and the given <i>column</i>.</p>
<p><b>Note:</b> The tree takes ownership of the widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qtreewidget.html#setItemWidget">setItemWidget</a>().</p>


<h3 class="fn"><a name="mimeData" /><a href="qmimedata.html">QMimeData</a> QTreeWidget.mimeData (<i>self</i>, list-of-QTreeWidgetItem&#160;<i>items</i>)</h3><p>The <i>QMimeData</i> result</p><p>Returns an object that contains a serialized description of the
specified <i>items</i>. The format used to describe the items is
obtained from the <a href="qtreewidget.html#mimeTypes">mimeTypes</a>() function.</p>
<p>If the list of items is empty, 0 is returned rather than a
serialized empty list.</p>


<h3 class="fn"><a name="mimeTypes" />QStringList QTreeWidget.mimeTypes (<i>self</i>)</h3><p>Returns a list of MIME types that can be used to describe a list
of treewidget items.</p>
<p><b>See also</b> <a href="qtreewidget.html#mimeData">mimeData</a>().</p>


<h3 class="fn"><a name="openPersistentEditor" />QTreeWidget.openPersistentEditor (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, int&#160;<i>column</i>&#160;=&#160;0)</h3><p>Opens a persistent editor for the <i>item</i> in the given
<i>column</i>.</p>
<p><b>See also</b> <a href="qtreewidget.html#closePersistentEditor">closePersistentEditor</a>().</p>


<h3 class="fn"><a name="removeItemWidget" />QTreeWidget.removeItemWidget (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, int&#160;<i>column</i>)</h3><p>Removes the widget set in the given <i>item</i> in the given
<i>column</i>.</p>
<p>This function was introduced in Qt 4.3.</p>


<h3 class="fn"><a name="scrollToItem" />QTreeWidget.scrollToItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, <a href="qabstractitemview.html#ScrollHint-enum">QAbstractItemView.ScrollHint</a>&#160;<i>hint</i>&#160;=&#160;QAbstractItemView.EnsureVisible)</h3><p>This method is also a Qt slot with the C++ signature <tt>void scrollToItem(const QTreeWidgetItem *,QAbstractItemView::ScrollHint = QAbstractItemView.EnsureVisible)</tt>.</p><p>Ensures that the <i>item</i> is visible, scrolling the view if
necessary using the specified <i>hint</i>.</p>
<p><b>See also</b> <a href="qtreewidget.html#currentItem">currentItem</a>(), <a href="qtreewidget.html#itemAt">itemAt</a>(), and <a href="qtreewidget.html#topLevelItem">topLevelItem</a>().</p>


<h3 class="fn"><a name="selectedItems" />list-of-QTreeWidgetItem QTreeWidget.selectedItems (<i>self</i>)</h3><p>Returns a list of all selected non-hidden items.</p>
<p><b>See also</b> <a href="qtreewidget.html#itemSelectionChanged">itemSelectionChanged</a>().</p>


<h3 class="fn"><a name="setColumnCount" />QTreeWidget.setColumnCount (<i>self</i>, int&#160;<i>columns</i>)</h3><h3 class="fn"><a name="setCurrentItem" />QTreeWidget.setCurrentItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>Sets the current <i>item</i> in the tree widget.</p>
<p>Unless the selection mode is <a href="qabstractitemview.html#SelectionMode-enum">NoSelection</a>, the
item is also be selected.</p>
<p><b>See also</b> <a href="qtreewidget.html#currentItem">currentItem</a>() and <a href="qtreewidget.html#currentItemChanged">currentItemChanged</a>().</p>


<h3 class="fn"><a name="setCurrentItem-2" />QTreeWidget.setCurrentItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, int&#160;<i>column</i>)</h3><p>Sets the current <i>item</i> in the tree widget and the current
column to <i>column</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qtreewidget.html#currentItem">currentItem</a>().</p>


<h3 class="fn"><a name="setCurrentItem-3" />QTreeWidget.setCurrentItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, int&#160;<i>column</i>, <a href="qitemselectionmodel-selectionflags.html">QItemSelectionModel.SelectionFlags</a>&#160;<i>command</i>)</h3><p>Sets the current <i>item</i> in the tree widget and the current
column to <i>column</i>, using the given <i>command</i>.</p>
<p>This function was introduced in Qt 4.4.</p>
<p><b>See also</b> <a href="qtreewidget.html#currentItem">currentItem</a>().</p>


<h3 class="fn"><a name="setFirstItemColumnSpanned" />QTreeWidget.setFirstItemColumnSpanned (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, bool&#160;<i>span</i>)</h3><p>Sets the given <i>item</i> to only show one section for all
columns if <i>span</i> is true; otherwise the item will show one
section per column.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qtreewidget.html#isFirstItemColumnSpanned">isFirstItemColumnSpanned</a>().</p>


<h3 class="fn"><a name="setHeaderItem" />QTreeWidget.setHeaderItem (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>The <i>item</i> argument has it's ownership transferred to Qt.</p><p>Sets the header <i>item</i> for the tree widget. The label for
each column in the header is supplied by the corresponding label in
the item.</p>
<p>The tree widget takes ownership of the item.</p>
<p><b>See also</b> <a href="qtreewidget.html#headerItem">headerItem</a>() and <a href="qtreewidget.html#setHeaderLabels">setHeaderLabels</a>().</p>


<h3 class="fn"><a name="setHeaderLabel" />QTreeWidget.setHeaderLabel (<i>self</i>, QString&#160;<i>alabel</i>)</h3><p>Same as setHeaderLabels(<a href="qstringlist.html">QStringList</a>(<i>label</i>)).</p>
<p>This function was introduced in Qt 4.2.</p>


<h3 class="fn"><a name="setHeaderLabels" />QTreeWidget.setHeaderLabels (<i>self</i>, QStringList&#160;<i>labels</i>)</h3><p>Adds a column in the header for each item in the <i>labels</i>
list, and sets the label for each column.</p>
<p>Note that setHeaderLabels() won't remove existing columns.</p>
<p><b>See also</b> <a href="qtreewidget.html#setHeaderItem">setHeaderItem</a>() and <a href="qtreewidget.html#setHeaderLabel">setHeaderLabel</a>().</p>


<h3 class="fn"><a name="setItemExpanded" />QTreeWidget.setItemExpanded (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, bool&#160;<i>expand</i>)</h3><h3 class="fn"><a name="setItemHidden" />QTreeWidget.setItemHidden (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, bool&#160;<i>hide</i>)</h3><h3 class="fn"><a name="setItemSelected" />QTreeWidget.setItemSelected (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, bool&#160;<i>select</i>)</h3><h3 class="fn"><a name="setItemWidget" />QTreeWidget.setItemWidget (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>, int&#160;<i>column</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>The <i>widget</i> argument has it's ownership transferred to Qt.</p><p>Sets the given <i>widget</i> to be displayed in the cell
specified by the given <i>item</i> and <i>column</i>.</p>
<p>The given <i>widget</i>'s <a href="qwidget.html#autoFillBackground-prop">autoFillBackground</a>
property must be set to true, otherwise the widget's background
will be transparent, showing both the model data and the tree
widget item.</p>
<p>This function should only be used to display static content in
the place of a tree widget item. If you want to display custom
dynamic content or implement a custom editor widget, use <a href="qtreeview.html">QTreeView</a> and subclass <a href="qitemdelegate.html">QItemDelegate</a> instead.</p>
<p>This function cannot be called before the item hierarchy has
been set up, i.e., the <a href="qtreewidgetitem.html">QTreeWidgetItem</a> that will hold
<i>widget</i> must have been added to the view before <i>widget</i>
is set.</p>
<p><b>Note:</b> The tree takes ownership of the widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qtreewidget.html#itemWidget">itemWidget</a>() and <a href="model-view-programming.html#delegate-classes">Delegate
Classes</a>.</p>


<h3 class="fn"><a name="setSelectionModel" />QTreeWidget.setSelectionModel (<i>self</i>, <a href="qitemselectionmodel.html">QItemSelectionModel</a>&#160;<i>selectionModel</i>)</h3><p>Reimplemented from <a href="qabstractitemview.html#setSelectionModel">QAbstractItemView.setSelectionModel</a>().</p>


<h3 class="fn"><a name="setSortingEnabled" />QTreeWidget.setSortingEnabled (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="sortColumn" />int QTreeWidget.sortColumn (<i>self</i>)</h3><p>Returns the column used to sort the contents of the widget.</p>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qtreewidget.html#sortItems">sortItems</a>().</p>


<h3 class="fn"><a name="sortItems" />QTreeWidget.sortItems (<i>self</i>, int&#160;<i>column</i>, <a href="qt.html#SortOrder-enum">Qt.SortOrder</a>&#160;<i>order</i>)</h3><p>Sorts the items in the widget in the specified <i>order</i> by
the values in the given <i>column</i>.</p>
<p><b>See also</b> <a href="qtreewidget.html#sortColumn">sortColumn</a>().</p>


<h3 class="fn"><a name="supportedDropActions" /><a href="qt-dropactions.html">Qt.DropActions</a> QTreeWidget.supportedDropActions (<i>self</i>)</h3><p>Returns the drop actions supported by this view.</p>
<p><b>See also</b> <a href="qt.html#DropAction-enum">Qt.DropActions</a>.</p>


<h3 class="fn"><a name="takeTopLevelItem" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidget.takeTopLevelItem (<i>self</i>, int&#160;<i>index</i>)</h3><p>The <i>QTreeWidgetItem</i> result</p><p>Removes the top-level item at the given <i>index</i> in the tree
and returns it, otherwise returns 0;</p>
<p><b>See also</b> <a href="qtreewidget.html#insertTopLevelItem">insertTopLevelItem</a>(),
<a href="qtreewidget.html#topLevelItem">topLevelItem</a>(), and
<a href="qtreewidget.html#topLevelItemCount-prop">topLevelItemCount</a>().</p>


<h3 class="fn"><a name="topLevelItem" /><a href="qtreewidgetitem.html">QTreeWidgetItem</a> QTreeWidget.topLevelItem (<i>self</i>, int&#160;<i>index</i>)</h3><p>Returns the top level item at the given <i>index</i>, or 0 if
the item does not exist.</p>
<p><b>See also</b> <a href="qtreewidget.html#topLevelItemCount-prop">topLevelItemCount</a>()
and <a href="qtreewidget.html#insertTopLevelItem">insertTopLevelItem</a>().</p>


<h3 class="fn"><a name="topLevelItemCount" />int QTreeWidget.topLevelItemCount (<i>self</i>)</h3><h3 class="fn"><a name="visualItemRect" /><a href="qrect.html">QRect</a> QTreeWidget.visualItemRect (<i>self</i>, <a href="qtreewidgetitem.html">QTreeWidgetItem</a>&#160;<i>item</i>)</h3><p>Returns the rectangle on the viewport occupied by the item at
<i>item</i>.</p>
<p><b>See also</b> <a href="qtreewidget.html#itemAt">itemAt</a>().</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="currentItemChanged" />void currentItemChanged (QTreeWidgetItem *,QTreeWidgetItem *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the current item changes. The
current item is specified by <i>current</i>, and this replaces the
<i>previous</i> current item.</p>
<p><b>See also</b> <a href="qtreewidget.html#setCurrentItem">setCurrentItem</a>().</p>


<h3 class="fn"><a name="itemActivated" />void itemActivated (QTreeWidgetItem *,int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the user activates an item by
single- or double-clicking (depending on the platform, i.e. on the
<a href="qstyle.html#StyleHint-enum">QStyle.SH_ItemView_ActivateItemOnSingleClick</a>
style hint) or pressing a special key (e.g., <b>Enter</b>).</p>
<p>The specified <i>item</i> is the item that was clicked, or 0 if
no item was clicked. The <i>column</i> is the item's column that
was clicked, or -1 if no item was clicked.</p>


<h3 class="fn"><a name="itemChanged" />void itemChanged (QTreeWidgetItem *,int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the contents of the <i>column</i> in
the specified <i>item</i> changes.</p>


<h3 class="fn"><a name="itemClicked" />void itemClicked (QTreeWidgetItem *,int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the user clicks inside the
widget.</p>
<p>The specified <i>item</i> is the item that was clicked. The
<i>column</i> is the item's column that was clicked. If no item was
clicked, no signal will be emitted.</p>


<h3 class="fn"><a name="itemCollapsed" />void itemCollapsed (QTreeWidgetItem *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the specified <i>item</i> is
collapsed so that none of its children are displayed.</p>
<p><b>Note:</b> This signal will not be emitted if an item changes
its state when <a href="qtreeview.html#collapseAll">collapseAll</a>() is invoked.</p>
<p><b>See also</b> <a href="qtreewidgetitem.html#isExpanded">QTreeWidgetItem.isExpanded</a>(),
<a href="qtreewidget.html#itemExpanded">itemExpanded</a>(), and
<a href="qtreewidget.html#collapseItem">collapseItem</a>().</p>


<h3 class="fn"><a name="itemDoubleClicked" />void itemDoubleClicked (QTreeWidgetItem *,int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the user double clicks inside the
widget.</p>
<p>The specified <i>item</i> is the item that was clicked, or 0 if
no item was clicked. The <i>column</i> is the item's column that
was clicked. If no item was double clicked, no signal will be
emitted.</p>


<h3 class="fn"><a name="itemEntered" />void itemEntered (QTreeWidgetItem *,int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the mouse cursor enters an
<i>item</i> over the specified <i>column</i>. <a href="qtreewidget.html">QTreeWidget</a> mouse tracking needs to be
enabled for this feature to work.</p>


<h3 class="fn"><a name="itemExpanded" />void itemExpanded (QTreeWidgetItem *)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the specified <i>item</i> is
expanded so that all of its children are displayed.</p>
<p><b>Note:</b> This signal will not be emitted if an item changes
its state when <a href="qtreeview.html#expandAll">expandAll</a>()
is invoked.</p>
<p><b>See also</b> <a class="obsolete" href="qtreewidget-obsolete.html#setItemExpanded">setItemExpanded</a>(), <a href="qtreewidgetitem.html#isExpanded">QTreeWidgetItem.isExpanded</a>(),
<a href="qtreewidget.html#itemCollapsed">itemCollapsed</a>(), and
<a href="qtreewidget.html#expandItem">expandItem</a>().</p>


<h3 class="fn"><a name="itemPressed" />void itemPressed (QTreeWidgetItem *,int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the user presses a mouse button
inside the widget.</p>
<p>The specified <i>item</i> is the item that was clicked, or 0 if
no item was clicked. The <i>column</i> is the item's column that
was clicked, or -1 if no item was clicked.</p>


<h3 class="fn"><a name="itemSelectionChanged" />void itemSelectionChanged ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the selection changes in the tree
widget. The current selection can be found with <a href="qtreewidget.html#selectedItems">selectedItems</a>().</p>


<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>